Fully Qualified Name: | Laminas\Crypt\Password\Bcrypt |
Implements: | PasswordInterface |
Bcrypt algorithm using crypt() function of PHP
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | Bcrypt |
benchmarkCost() | Bcrypt | |
create() | Bcrypt | Bcrypt |
getCost() | Get the cost parameter | Bcrypt |
getSalt() | Get the salt value | Bcrypt |
setCost() | Set the cost parameter | Bcrypt |
setSalt() | Set the salt value | Bcrypt |
verify() | Verify if a password is correct against a hash value | Bcrypt |
Constructor
Parameter Name | Type | Description |
---|---|---|
$options | array|\Traversable |
Returns:
Parameter Name | Type | Description |
---|---|---|
$timeTarget |
Returns: void
Bcrypt
Parameter Name | Type | Description |
---|---|---|
$password | string |
Returns: string
Get the cost parameter
Returns: string
Get the salt value
Returns: string
Set the cost parameter
Parameter Name | Type | Description |
---|---|---|
$cost | int|string |
Returns: \Bcrypt Provides a fluent interface
Set the salt value
Parameter Name | Type | Description |
---|---|---|
$salt | string |
Returns: \Bcrypt Provides a fluent interface
Verify if a password is correct against a hash value
Parameter Name | Type | Description |
---|---|---|
$password | string | |
$hash | string |
Returns: bool